package com.imooc.girl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service
public class GirlService {

    @Autowired
    private GirlRepository girlRepository;

    @Transactional
    public void insertTwo() {
        Girl girl = new Girl();
        girl.setAge(1);
        girl.setCupSize("F");
        girlRepository.save(girl);


        Girl girlB = new Girl();
        girlB.setAge(18);
        girlB.setCupSize("FFFFF");
        girlRepository.save(girlB);
    }
}
